<extend name="Base/common"/>
<block name="style">
    <style type="text/css">
        .weui-cell_access .weui-cell__ftnone:after{border-style:none;}
    </style>
</block>
<block name="body">
    <form class="formtijiao" action="" method="post">
        <div class="content">
            <div class="login-register clearfix">
                <ul class="register-kk">
                    <li><em>学信账号</em>
                        <input type="text" placeholder="请输入学信账号" name="username" class="register-sh username" />
                        <span class="app-iconfont regt-close">&#xe614;</span>
                    </li>
                    <li><em>学信密码</em>
                        <input type="password"  name="password"   placeholder="请输入学信密码" class="register-sh password" />
                        <span class="app-iconfont regt-close dn">&#xe614;</span>
                    </li>
                </ul>
                <p class="login-tips">
                    <input type="checkbox" class="chex xuexin" /><label> 我同意<span><a href="{:U('Article/detail?id=2')}">《学信网授权协议》</a></span></label>
                </p>
                <p class="login-tips">
                    <input type="checkbox" class="chex reginfo" /><label>我同意<a href="{:U('Article/detail?id=3')}"> <span>《信息收集与使用规则》</a></span></label>
                </p>
                
                <input type="button" value="下一步" class="login-btn" />
                
            </div>

        </div>


       <!--  <div class="weui-cells weui-cells_form">
            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">学信账号</label></div>
                <div class="weui-cell__bd">
                    <input class="weui-input username" name="username" placeholder="请输入学信账号" type="text">
                </div>
            </div>
            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">学信密码</label></div>
                <div class="weui-cell__bd">
                    <input class="weui-input password" name="password"  placeholder="请输入学信密码" type="password">
                </div>
            </div>
        </div>
        <label for="weuiAgree" style="padding-top: 1em;" class="weui-agree">
            <input id="weuiAgree1" name="xuexin" checked class="weui-agree__checkbox xuexin" type="checkbox">
                <span class="weui-agree__text"> 我同意<a href="{:U('Article/detail?id=2')}">《学信网授权协议》</a></span>
        </label>
        <label for="weuiAgree" style="padding-top: 0;" class="weui-agree">
            <input id="weuiAgree" checked name="reginfo" class="weui-agree__checkbox reginfo" type="checkbox">
                <span class="weui-agree__text">我同意<a href="{:U('Article/detail?id=3')}">《信息收集及使用规则》</a></span>
        </label>
        <div class="page__bd page__bd_spacing" style="padding-top: 1em;">
            <button class="weui-btn weui-btn_primary" type="button">确定</button>
        </div> -->
    </form>
    <p class="login-tips"><em>温馨提示</em>：<br>学信认证是对您的学历信息进行认证。真实的学历信息有助于了解您的信用水平。</p>
   <!--  <div class="weui-cells__tips">
        <br>
        <br>
        温馨提示<br>
        学信认证是对您的学历信息进行认证。真实的学历信息有助于了解您的信用水平。
    </div> -->

</block>
<block name="script">
    <script >
        Zepto(function($){
            $('.login-btn').click(function(){
                var username = $('.username').val();
                var password = $('.password').val();
                if(username==''){
                    popup.alert('学信账号不能为空');return false;
                }
                if(password==''){
                    popup.alert('学信密码不能为空');return false;
                }
                if(!$('.xuexin').is(':checked')) {
                    popup.alert('请同意学信网授权协议');return false;
                }
                if(!$('.reginfo').is(':checked')) {
                    alert('请同意信息收集及使用规则');return false;
                }
                app.AjaxSubmit('.formtijiao',function(data){
                    if(data.status==true){
                        popup.alert(data.info,data.url);
                    }else{
                        if(data.url!='' && data.url!=undefined){
                            popup.alert(data.info,data.url);return false;
                        }
                        if(data.token!=undefined){
                            popup.loading(' 正在受权中，请稍后...');
                            var data2 = {token:data.token,type:data.type,url:"<php>echo U('xuexininfo');</php>"};
                            app.token(data2,"<php>echo U('Router/token');</php>");
                            return false;
                        }else{
                            popup.alert(data.info);return false;
                        }
                    }
                });
            }) ;
        });

    </script>

</block>